package cn.s1995.sloth.bizs.entity;

import cn.s1995.sloth.bizs.entity.base.BaseEntity;
import cn.s1995.sloth.common.core.convert.JoinUrlPrefixConvert;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 产品分类
 *
 * @author Lex
 * @date 2023-12-14 09:47:11
 */
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "产品分类")
@TableName("biz_prod_category")
public class ProdCategory extends BaseEntity {


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "ID")
    private Long id;

	/**
	* 父id
	*/
    @Schema(description = "父id")
    private Long pid;

	/**
	* 名称
	*/
    @Schema(description = "名称")
	@TableField("`name`")
    private String name;

	/**
	* 层级
	*/
    @Schema(description = "层级")
    private Integer level;

	/**
	* 是否显示
	*/
    @Schema(description = "是否显示")
    private Boolean isShow;

	/**
	* 图标
	*/
    @Schema(description = "图标")
    private String icon;

	/**
	* 图片
	*/
    @JsonSerialize(using = JoinUrlPrefixConvert.class)
    @Schema(description = "图片")
    private String pic;

	/**
	* 路径
	*/
    @Schema(description = "路径")
    private String path;

	/**
	* 排序
	*/
    @Schema(description = "排序")
    private Integer sort;

	/**
	* 店铺id
	*/
    @Schema(description = "店铺id")
    private Long shopId;
}
